	<include file='Common:header' />

		<!-- /section:basics/navbar.layout -->
		<div class="main-container" id="main-container">

			<!-- #section:basics/sidebar -->

	<include file='Common:left' />
			<!-- /section:basics/sidebar -->
			
			<div class="main-content">
				<div class="main-content-inner">
					<div class="page-content">
						
							<div class="row">
							    <div class="col-xs-12">
										<div>
											<form id="link_list_sort" name="link_list_sort" method="post" action="{:U('link_list_sort')}" >
											<table width="100%" class="table table-striped table-bordered table-hover" id="dynamic-table">
												<thead>
													<tr>
													  <th width="5%">ID</th>
													  <th width="30%">机构名称</th>
													  <th width="45%">链接地址</th>
													  <th width="10%">展示排序</th>
													  <th width="10%" style="border-right:#CCC solid 1px;">操作</th>
												  </tr>
												</thead>

												<tbody>

                                                <foreach name="link_list" item="v">
													<tr>
														<td height="28">{$v.id}</td>
														<td>{$v.name}</td>
														<td>
															{$v.link_url}
														</td>
														<td><input name="{$v.id}" class="list_order" value="{$v.sort}" size="3"/></td>
														<td>
						<div class="hidden-sm hidden-xs action-buttons">
							<a class="green"  href="{:U('link_list_edit',array('id'=>$v['id']))}"  title="修改">
								<i class="ace-icon fa fa-pencil bigger-130"></i>
							</a>
							<a class="red" href="javascript:;" onclick="return del({$v.id});" title="删除">
								<i class="ace-icon fa fa-trash-o bigger-130"></i>
							</a>
						</div>
													</td>
													</tr>
                                                 </foreach>   
                                                  <tr>
													  <td colspan="5" align="left"><button type="submit"  id="btnorder" class="btn btn-white btn-yellow btn-sm">排序</button></td>
												  </tr>
												</tbody>
										  </table>
										  </form>
							    		</div>
						</div>
					</div>
<include file='Common:header_nav' />

<script>
//排序提交
$(function(){
	$('#link_list_sort').ajaxForm({
		success: complete, // 这是提交后的方法
		dataType: 'json'
	});

	function complete(data){
		if(data.status==1){
			layer.alert(data.info, {icon: 6}, function(index){
 			layer.close(index);
			window.location.href=data.url;
			});
		}else{
			layer.alert(data.info, {icon: 6}, function(index){
 			layer.close(index);
			window.location.href=data.url;
			});
		}
	}
});

//删除
function del(id){
	layer.confirm('你确定要删除吗？', {icon: 3}, function(index){
	layer.close(index);
	window.location.href="__URL__/link_del/id/"+id+"";
	});
}
</script>
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->
	<include file='Common:footer' />
    
		</div><!-- /.main-container -->
	</body>
</html>
